package com.skyworthclub.competition;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * 主启动类
 * @author li
 * 开启声明式事务
 * 启用注解式缓存
 * 启用注解式异步任务
 */
@EnableTransactionManagement
@EnableCaching
@EnableAsync
@SpringBootApplication
public class CompetitionApplication {


    public static void main(String[] args) {
        //解决因为elasticsearch启动异常的问题
        System.setProperty("es.set.netty.runtime.available.processors","false");
        SpringApplication.run(CompetitionApplication.class, args);
    }

}
